import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/Page")
public class PageServlet extends HttpServlet {
    protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //设置响应编码格式
        response.setContentType("text/html;charset=utf-8");
        //获取请求信息
        //处理请求
        //响应处理结果
        response.getWriter().write("<html>");
        response.getWriter().write("<head>");
        response.getWriter().write("</head>");
        response.getWriter().write("<body>");
        response.getWriter().write("<form action='/Login' method='get'>");
        response.getWriter().write("用户名:<input type='text' name='uname' value=''/><br/>");
        response.getWriter().write("密码:<input type='password' name='pwd' value=''/><br/>");
        response.getWriter().write("<input type='submit'  value='登录'/><br/>");
        response.getWriter().write("</form>");
        response.getWriter().write("</body>");
        response.getWriter().write("</html>");


    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
